

from core.himesis import Himesis
import cPickle as pickle
from uuid import UUID

class HM2M(Himesis):
    def __init__(self):
        """
        Creates the himesis graph representing the AToM3 model HM2M.
        """
        # Flag this instance as compiled now
        self.is_compiled = True
        
        super(HM2M, self).__init__(name='HM2M', num_nodes=7, edges=[])
        
        # Add the edges
        self.add_edges([(2, 0), (0, 5), (1, 3), (3, 4), (6, 4), (5, 6)])
        # Set the graph attributes
        self["mm__"] = pickle.loads("""(lp1
S'SimpleDSLTransMM'
p2
a.""")
        self["name"] = """M2M"""
        self["GUID__"] = UUID('425b6280-cfca-47b6-812b-733960b89b6f')
        
        # Set the node attributes
        self.vs[0]["mm__"] = """apply_contains"""
        self.vs[0]["GUID__"] = UUID('5cbf36f9-9fd5-4fa5-8005-e73f6875268d')
        self.vs[1]["mm__"] = """MatchModel"""
        self.vs[1]["GUID__"] = UUID('5838fde0-139b-4573-b954-c6d235968834')
        self.vs[2]["mm__"] = """ApplyModel"""
        self.vs[2]["GUID__"] = UUID('85c992e4-4c79-4149-bd4f-acf414666368')
        self.vs[3]["mm__"] = """match_contains"""
        self.vs[3]["GUID__"] = UUID('6a32033a-45c2-4b68-a3c4-ff795917e0c8')
        self.vs[4]["mm__"] = """Male_S"""
        self.vs[4]["name"] = """m"""
        self.vs[4]["GUID__"] = UUID('bcb1eb7c-2037-4c38-a997-100459b72fe4')
        self.vs[5]["mm__"] = """Male_T"""
        self.vs[5]["name"] = """m"""
        self.vs[5]["GUID__"] = UUID('75bbc23a-6484-4d9a-a1c5-7b41fe135e44')
        self.vs[6]["mm__"] = """backward_link"""
        self.vs[6]["GUID__"] = UUID('9997d0b2-2fc1-4d5c-b2c0-5b9c50615b99')

